Q: I have a LANDSAT image of Washington DC, and I'd like to see how it looks on the MegaPixel display. Can anyone help me with code? The image is 1024X1024 8-bit pixels, and the file has no header -- just 1024 bytes for line 1 followed by 1024 bytes for line 2, etc to EOF, altogether 1 Megabyte.\
\
Also, I suppose I would only see 2-bit pixels on the MegaPixel-display. Or can I use the other bits of image data as well?\
\
A: You can try appending a PS header on top of it and executing it in Yap. Here's a header that might work; it worked for the pictures of Neptune & Triton that were publicly available on some FTP hosts.\
width scaleFactor mul height scaleFactor mul scale\
thedata\
\f1\b0 \
Cut the section between the lines, save as
\b header.ps
\b0 , change the width and height values (to 1024 and 1024), then append it to the front of your data file with\
\
\f2\b cat header.ps yourdatafile > new.ps
\f1\b0 \
\
Then fire Yap up, and open
\b new.ps
\b0 . Once it's loaded, execute it; see what you get.\
\
The file
\b new.ps
\b0 won't be previewable; it lacks the correct EPS header using the above cheapo segment of PostScript. But if it works through Yap, then you can worry about making it correct EPS. You can also just do a screen grab with Icon or Scene to get a TIFF file.\
\
To answer the second question: PostScript is pretty smart about dithering; it will not waste your 8 bits.\